import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      // 重定向
      redirect:'/FService',
      component: HomeView,
      children:[{
        path:'FService',
        name:'fservice',
        component: ()=>import('../views/FService.vue'),
      },{
        path:'YStaff',
        name:'ystaff',
        component: ()=>import('../views/YStaff.vue'),
      },{
        path:'GCompany',
        name:'gcompany',
        component: ()=>import('../views/GCompany.vue'),
      },{
        path:'YUser',
        name:'yuser',
        component: ()=>import('../views/YUser.vue'),
      }]
    },{
      path: '/Goods',
      name: 'goods',
      component: ()=>import('../views/Goods.vue'),
    }
  ],
})

export default router
